package com.cykj.service.impl;

import com.cykj.dto.ResponseDTO;
import com.cykj.entity.LogDO;
import com.cykj.mapper.LogMapper;
import com.cykj.service.ILogService;
import com.cykj.vo.LogVO;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Program: Mooc-Admin
 * @Package: com.cykj.service.impl
 * @Author: 张俊杰
 * @Create: 2025-07-15 17:03
 * @Description: TODO
 * @Vision: 1.0
 **/
@Service
public class LogServiceImpl implements ILogService {

    @Autowired
    private LogMapper logMapper;

    @Override
    public ResponseDTO getListLog(LogVO logVO) {

        PageHelper.startPage(logVO.getPageNum(), logVO.getPageSize());

        List<LogDO> listLog = logMapper.getListLog();

        PageInfo<LogDO> logDOPageInfo = new PageInfo<>(listLog);

        return ResponseDTO.success(logDOPageInfo);
    }
}
